package com.bridgetek.carlauncher.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import java.util.List;

/**
 * 作者：wangTao on 16-9-22 11:45
 * 邮箱：tao.wang@bridgelec.com
 */
public class MainPagerAdapter extends FragmentPagerAdapter {
    private List<Fragment> list;

    public MainPagerAdapter(FragmentManager fm, List<Fragment> list) {
        super(fm);
        this.list = list;
    }

    @Override
    public int getItemPosition(Object object) {
        return super.getItemPosition(object);
    }

    @Override
    public Fragment getItem(int arg0) {
        return list.get(arg0);
    }

    @Override
    public int getCount() {
        return list.size();
    }

}
